package com.bj58.mis.apm.server.kylin.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

public class Project {
    private String uuid;
    private Long last_modified;
    private String version;
    private String name;
    private String owner;
    private String status;
    private Long create_time_utc;
    private String description;
    private List<String> cubes;
    private List<String> models;
    private List<Map<String, String>> realizations;

    private Date d_last_modified;
    private Date d_create_time_utc;

    public Project(){}

    public Project deal(){
        cubes = new ArrayList<>();
        realizations.forEach(c -> {
            if ("CUBE".equals(c.get("type"))) {
                this.cubes.add(c.get("realization"));
            }
        });

        this.d_last_modified = new Date(this.last_modified);
        this.d_create_time_utc = new Date(this.create_time_utc);

        return this;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Long getLast_modified() {
        return last_modified;
    }

    public void setLast_modified(Long last_modified) {
        this.last_modified = last_modified;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getCreate_time_utc() {
        return create_time_utc;
    }

    public void setCreate_time_utc(Long create_time_utc) {
        this.create_time_utc = create_time_utc;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<String> getCubes() {
        return cubes;
    }

    public void setCubes(List<String> cubes) {
        this.cubes = cubes;
    }

    public List<String> getModels() {
        return models;
    }

    public void setModels(List<String> models) {
        this.models = models;
    }

    public List<Map<String, String>> getRealizations() {
        return realizations;
    }

    public void setRealizations(List<Map<String, String>> realizations) {
        this.realizations = realizations;
    }

    public Date getD_last_modified() {
        return d_last_modified;
    }

    public void setD_last_modified(Date d_last_modified) {
        this.d_last_modified = d_last_modified;
    }

    public Date getD_create_time_utc() {
        return d_create_time_utc;
    }

    public void setD_create_time_utc(Date d_create_time_utc) {
        this.d_create_time_utc = d_create_time_utc;
    }
}
